package com.itlong.cloud.property.service;

import com.itlong.cloud.POJO.DTO.sdk.VisitorServerGetListDTO;
import com.itlong.cloud.POJO.DTO.sdk.VisitorServerSubmitDTO;
import com.itlong.cloud.POJO.VO.sdk.VisitorServerGetListVO;
import com.itlong.cloud.utils.page.Page;

import java.io.IOException;
import java.security.NoSuchProviderException;
import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * <desc>
 *      访客机API
 * </desc>
 *
 * @create 2019/04/29
 */
public interface IVisitorServerService {
    /**
     * <desc>
     *      验证身份信息
     * </desc>
     *
     * @param appid
     * @param appSecret
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    Integer checkIdentity(String projectId, String appid, String appSecret);

    /**
     * <desc>
     *      获取地址信息
     * </desc>
     *
     * @param projectId
     * @param buildId
     * @param unitId
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    List<Map<String,Object>> getAddressInfo(String projectId, String buildId, String unitId);

    /**
     * <desc>
     *      提交访客单
     * </desc>
     *
     * @param dto
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    Map<String,Object> submit(VisitorServerSubmitDTO dto) throws Exception;

    /**
     * <desc>
     *      查询访客单列表
     * </desc>
     *
     * @param dto
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    Page<VisitorServerGetListVO> getList(VisitorServerGetListDTO dto) throws Exception;

    /**
     * <desc>
     *      审批
     * </desc>
     *
     * @param projectId
     * @param visitorNo
     * @return
     * @author Jiaqi.X
     * @createDate 2019/04/29
     */
    String approve(String projectId,String visitorNo) throws Exception;
}
